package org.example.controller;

import org.example.service.BettingService;

public class HighStakesController extends BaseController {
    private final BettingService bettingService;

    public HighStakesController(BettingService bettingService) {
        this.bettingService = bettingService;
    }


    @Override
    public String handleRequest() {
        try {
            Integer betOfferId = getIntPathParam("betOfferId");
            if (betOfferId == null) {
                return "ERROR:400:Invalid path - missing or invalid betOfferId";
            }

            String highStakes = bettingService.getHighStakes(betOfferId);
            System.out.println("highStakes"+highStakes);
            return "SUCCESS:200:" + highStakes;

        } catch (Exception e) {
            return "ERROR:500:Internal Server Error";
        }
    }
}